export function add(a,b){
    return a+b;
}
export function reduce(a,b){
    return a-b;
}

import axios from "axios";
export const fetchData = (callback)=>{
    axios.get("http://localhost:3000/users/login").then((data)=>{
        callback(data.data);
    })
}

// 用promise的方式来做测试
export const fetchDataPromise = ()=>{
    return axios.get("http://localhost:3000/users/login");
}